<?php
/**
 * The Header for our theme.
 * @package AGILSUN
 * @author Mr.Hao <haonguyen.agilsun@gmail.com>
 */

global $sTemplateURL;
$sTemplateURL = get_template_directory_uri();

define('HTML_MODE', (!empty($_GET['htmlmode']) ? '' : '.min') );

?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>
	<?php
    /*
     * Print the <title> tag based on what is being viewed.
     */
    global $page, $paged;

    wp_title( '|', true, 'right' );

    // Add the blog name.
    bloginfo( 'name' );

    // Add the blog description for the home/front page.
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description && ( is_home() || is_front_page() ) )
        echo " | {$site_description}";

    // Add a page number if necessary:
    if ( $paged >= 2 || $page >= 2 )
        echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
    ?>
</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> 
<script>window.jQuery || document.write('<script src="<?php echo $sTemplateURL; ?>/js/vendor/jquery-1.10.1.min.js"><\/script>')</script> 
<?php wp_head(); ?>
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>">
<link rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/css/flexslider.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800&subset=vietnamese' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/css/main.css">
<?php $options = get_option( 'agilsun_theme_options' ); ?>
<?php echo $options['headerscript']; ?>
</head>
<body>
<div id="container">
    <header>
        <hr class="line">
        <section class="container">
            <div class="header">
                <ul>
                    <li class="row logo-head">
                        <div class="logo col-md-6"> <a href="<?php bloginfo('url'); ?>"><img src="<?php echo $options['imglogo']; ?>" alt="logo"></a> </div>
                        <div class="search col-md-6">
                            <form method="get" id="searchform">
                                <input name="s" type="text" class="search-box" placeholder="Tìm kiếm..." >
                                <input type="submit" class="sprite btn-search" value=""/>
                            </form>
                        </div>
                    </li>
                    <li>
                        <button class="navbar-toggle" data-target=".bs-navbar-collapse" data-toggle="collapse" type="button"> <span class="sr-only"> Toggle navigation </span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
                        <nav class="collapse navbar-collapse bs-navbar-collapse nav-collapse" role="navigation">
                            <ul class="nav nav-pills main-nav">
                            	<?php
									wp_nav_menu( array(
										'theme_location' => 'main-menu',
										'container' => false,
										'container_class' => false, 
										'menu_class' => '',
										'container_id' => '',
										'link_before' => '',
										'link_after' => '',
										'items_wrap' => '%3$s',
										'fallback_cb' => 'wp_page_menu')
									);
								?>
                            </ul>
                            <span class="shadow_main_nav"></span> </nav>
                    </li>
                </ul>
                <span class="home-header-shadow sprite"></span> </div>
        </section>
    </header>
    <!-- end header -->